package updater.currency.xml;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import com.thoughtworks.xstream.*;
import com.thoughtworks.xstream.io.xml.DomDriver;

public class Reader {
	
	public static void main(String[] args) {
		XStream xs = new XStream(new DomDriver());
		Employee e = new Employee();
		
		try {
			String filePath = "Data/employeedata.xml";
			String currentPath = new File(filePath).getAbsolutePath();
			FileInputStream fis = new FileInputStream(currentPath);
			xs.fromXML(fis, e);
			
			//print the data from the object which has been read
			System.out.println(e.toString());
			
		} catch (FileNotFoundException ex) {
			ex.printStackTrace();
		}
		
	}
}